<!-- 唐礼飞 2020-05-28 08:33:32.565 -->
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isErrorPage="true"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<%@include file="../../../include/meta.jsp"%>
<title>错误信息</title>
<%@include file="../../../include/css.jsp"%>
<style type="text/css">
body {
	background-color: #0000CD;
}

.error-container {
	width: 80%;
	color: #FFF;
	text-align: center;
	margin: 0 auto;
}

#time {
	color: red;
}
</style>
</head>
<body>
	<br />
	<br />
	<div class="error-container">
		<h1 class="text-left">系统出错了，......</h1>
		<h2>
			系统将在&nbsp;<span id="time">10</span>&nbsp;秒后自动跳转到${pageName}！
		</h2>
		<br /> <a class="btn btn-outline-light"
			href="${pageContext.request.contextPath}/${page}"><i
			class="fas fa-reply"></i>&nbsp;返回${pageName}</a> &nbsp;&nbsp; <a
			class="btn btn-outline-light" data-toggle="collapse"
			href="#errorMessage" role="button" aria-expanded="false"
			aria-controls="errorMessage"><i class="fas fa-eye"></i>&nbsp;显示错误信息</a>
		<br/>
		<br/>
		<div class="collapse" id="errorMessage">
			<div class="card card-body text-danger text-left">
				<p><%=exception==null?"":exception %></p>
				<p class="text-dark">
					<%
					if(exception!=null){
						StackTraceElement[] trace=exception.getStackTrace();
						for(int i=0;i<trace.length;i++){
							out.println(trace[i]);
						}
					}
					%>
				</p>
			</div>
		</div>
	</div>
	<%@include file="../../../include/js.jsp"%>
	<script type="text/javascript">
		var time = 10;
		setInterval(
				function() {
					time--;
					$("#time").text(time);
					if (time === 0) {
						window.location.href = "${pageContext.request.contextPath}/${page}";
					}
				}, 1000);
	</script>
</body>
</html>